<template>
  <div class="comfirm_btn_wrap">
    <div class="comfirm_btn" @click="comfirmEvent">{{ btnName }}</div>
    <div class="upload_fixed" v-if="isShowDiamond">
      <div class="number">{{ diamondNum }}</div>
      <!-- <img src="@/assets/images/btn_tag@2x.png" class="img" /> -->
    </div>
    <div class="diamond_num" v-if="isShowDiamond">My gems：{{ gemsNum }}</div>
    <!-- 当“Remove blur”模糊时显示 -->
    <div class="blur_user" v-if="isBlurStatus">
      <div class="text">Remove blur only 1</div>
      <img src="@/assets/images/ic_star_48@2x.png" class="img_star" />
    </div>
  </div>
</template>
<script setup>
defineProps({
  btnName: {
    type: String,
    required: true,
  },
  gemsNum: {
    type: String,
  },
  diamondNum: {
    type: String,
  },
  isBlurStatus: {
    type: Boolean,
    default: false,
  },
  isShowDiamond: {
    type: Boolean,
    default: false,
  },
});

const emit = defineEmits(["comfrim"]);
const comfirmEvent = () => {
  emit("comfrim");
};
</script>

<style scoped lang="less">
.comfirm_btn_wrap {
  margin-top: 12px;
  width: 100%;
  height: 64px;
  background: linear-gradient(90deg, #ffd52f 0%, #f874ff 50%, #516eff 100%);
  border-radius: 8px 8px 8px 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
  line-height: 64px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  border: 0;
  position: relative;

  .comfirm_btn {
    font-weight: 700;
  }

  .upload_fixed {
    min-width: 66px;
    height: 32px;
    position: absolute;
    right: -5px;
    top: -4px;
    display: flex;
    justify-content: left;
    align-items: center;
    background-image: url("../assets/images/btn_tag@2x.png");
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    box-sizing: border-box;
    padding-right: 30px;

    .number {
      font-size: 14px;
      color: #ffffff;
      margin-left: 5px;
    }
  }

  .diamond_num {
    width: 100%;
    height: 15px;
    line-height: 15px;
    position: absolute;
    text-align: center;
    font-weight: 400;
    font-size: 12px;
    color: #000000;
    left: 0;
    bottom: -24px;
  }

  .blur_user {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;

    .text {
      font-size: 14px;
      color: #000000;
      font-weight: 700;
    }

    .img_star {
      width: 48px;
      margin-left: 8px;
    }
  }
}
</style>
